<?php

namespace Sffi\ElementPlus\ElForm;

use Sffi\ElementPlus\entity\Option;
use Sffi\ElementPlus\entityTrait\SelectOption;

class ElRadio extends FormItem
{
    use SelectOption;

    protected string $type = 'radio';
    public function __construct($title, $key)
    {
        $this->title = $title;
        $this->key = $key;
        $this->prop = $key;
    }

    public function addOptionByArgs(string $key, string $value,bool $disabled=false)
    {
        return $this->addOption(new Option($key, $value, $disabled));
    }
}
